All Questions
50 questions
2votes
2answers
129views
A thread-safe performant Money Transfer API in Java
This is a popular interview question. It is meant to be done within 30 minutes. The task is to implement a thread-safe performant Bank Account API that allows to transfer, deposit, withdraw and check ...
1vote
0answers
80views
A parallel MSD radix sort in Java for integer keys
I have this repository: https://github.com/coderodde/ParallelRadixSort.java/tree/main It contains a parallel MSD radix sort presented below: ...
4votes
2answers
308views
Multiplayer queue optimisation
I currently have code that is working but I think it can be optimised. The code waits until a player joins and adds the player to a BlockingQueue if there is not already a Player waiting then it ...
0votes
3answers
1kviews
Fastest way to create random pixel image
I want to create a very big gigantic PNG image. The image pixel are generated randomly, being How can I improve the below code to create a fast random pixel image in java? ...
2votes
3answers
116views
Java file analyzer byte-by-byte
This is part of this topic. Problem: I need to read a file with BigIntegers and make some analysis "on-the-fly" with each read number (get prime numbers count, get armstrong numbers count). Right now ...
2votes
1answer
542views
Producer consumer design and implementation using Java 8
Please review my design and code implementation and suggest if any optimisation is possible in terms of performance (time complexity / space complexity ) or any better way of design or implementation. ...
3votes
1answer
2kviews
Matchmaking for a multiplayer game
I have working code that needs some optimization for scalability and overall performance. This code basically creates a lobby where users wait for match to be created and link users for a multiplayer ...
4votes
2answers
11kviews
FFMPEG with Java Wrapper
In this java application, I am trying to convert an video into small clips. Here is the implementation class for the same ...
3votes
0answers
4kviews
Matrix multiplication project using multithreading in java
Below is my code of matrix multiplication in Java. It has both implementation of matrix multiplication- one without multi-threading and another one using multi-threading. For multi-threading ...
3votes
1answer
393views
Port Availability Scanner, written in Java (9)
For purpose of practice and experience, I was working on a "Port Availability Scanner" written in Java. So far it's working but it's really slow. Especially on relatively large quantities of ports (...
1vote
1answer
57views
Combining multiple files using a single server in Java
I have ~50 files, each file contains records that look like the following: ...
3votes
1answer
13kviews
Processing files in directories with multithreading
I am processing files in directories. I want to use multi-threading in two ways: 10 threads to process files/folders concurrently 10 threads to process all lines in each file concurrently In this code,...
5votes
3answers
2kviews
Brute-force Vigenere Cipher using multiple threads
I'm trying to brute force a Vigenere Cipher knowing only that the key length is 5+ characters and that the decrypted text has the word ...
3votes
2answers
1kviews
Counting multiples of 3 or 5 using threads
I have a modified version of the first Project Euler problem — where I find the sum of all the numbers below the value 2100000000 that are multiples of 3 or 5 using a multi-threaded program. The ...
12votes
2answers
10kviews
Efficiently using Apache HttpClient in multithreaded environment
I have a library which is being used by customers and they are passing DataRequest object which has userid, various ...